{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}/Users/ruthdassonneville/Desktop/replication psrm.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}20 Jan 2019, 12:08:16

{com}. do "/var/folders/gy/m6tq83q57px9bwbt12hn6wh80000gn/T//SD40909.000000"
{txt}
{com}. **************************************************************************************************
. ** File name:   Replication_PSRM_2019.do  (Manuscript + Supplementary materials)                            **
. ** Purpose:     Estimations, producing tables and figures                                                                               **
. ** Paper:               Are Election Results More Unpredictable? A Forecasting Test                                             **
. ** Date:                January 2019                                                                                                                                    **
. ** Authors:     Richard Nadeau, Ruth Dassonneville, Michael S. Lewis-Beck & Philippe Mongrain   **
. **************************************************************************************************
. 
. 
. ** install commands (if not installed yet) and set scheme for graphs 
. 
. ssc install loevh, replace all
{txt}checking {hilite:loevh} consistency and verifying not already installed...
all files already exist and are up to date.

{com}. ssc install blindschemes, replace all
{txt}checking {hilite:blindschemes} consistency and verifying not already installed...
all files already exist and are up to date.

{com}. ssc install estout, replace all
{txt}checking {hilite:estout} consistency and verifying not already installed...

copying into {hilite:current directory}...
      copying  {hilite:estout.zip}
      copying  {hilite:estout_mystyle.def}
ancillary files successfully copied.

{com}. set scheme plotplainblind, permanently                                          // sets daniel bischof's plottig scheme as the default scheme for graphs
{txt}({cmd:set scheme} preference recorded)

{com}. 
. ** set working directory
. 
. cd "/Users/ruthdassonneville/Dropbox/forecast over time replication dataverse"
{res}/Users/ruthdassonneville/Dropbox/forecast over time replication dataverse
{txt}
{com}. 
. 
. **********************
. **   main results       **
. **********************
. 
. ** load data
.         
.         use "Dataset_PSRM_2019.dta", clear
{txt}
{com}.         
. ** description of the data (Table 1)
. 
.         tab country

    {txt}country {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         UK {c |}{res}         17       14.91       14.91
{txt}  Australia {c |}{res}         23       20.18       35.09
{txt}     Canada {c |}{res}         20       17.54       52.63
{txt}    Denmark {c |}{res}         21       18.42       71.05
{txt}    Germany {c |}{res}         17       14.91       85.96
{txt}        USA {c |}{res}         16       14.04      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}        114      100.00
{txt}
{com}.         tab country if Year>=1955 & Year<=1984

    {txt}country {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         UK {c |}{res}          9       15.25       15.25
{txt}  Australia {c |}{res}         12       20.34       35.59
{txt}     Canada {c |}{res}         11       18.64       54.24
{txt}    Denmark {c |}{res}         11       18.64       72.88
{txt}    Germany {c |}{res}          8       13.56       86.44
{txt}        USA {c |}{res}          8       13.56      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         59      100.00
{txt}
{com}.         tab country if Year>=1987 & Year<=2017

    {txt}country {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         UK {c |}{res}          8       14.55       14.55
{txt}  Australia {c |}{res}         11       20.00       34.55
{txt}     Canada {c |}{res}          9       16.36       50.91
{txt}    Denmark {c |}{res}         10       18.18       69.09
{txt}    Germany {c |}{res}          9       16.36       85.45
{txt}        USA {c |}{res}          8       14.55      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         55      100.00
{txt}
{com}.         
.         tab country if Year>=1955 & Year<=1970

    {txt}country {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         UK {c |}{res}          5       17.86       17.86
{txt}  Australia {c |}{res}          5       17.86       35.71
{txt}     Canada {c |}{res}          6       21.43       57.14
{txt}    Denmark {c |}{res}          4       14.29       71.43
{txt}    Germany {c |}{res}          4       14.29       85.71
{txt}        USA {c |}{res}          4       14.29      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         28      100.00
{txt}
{com}.         tab country if Year>=1971 & Year<=1986

    {txt}country {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         UK {c |}{res}          4       12.90       12.90
{txt}  Australia {c |}{res}          7       22.58       35.48
{txt}     Canada {c |}{res}          5       16.13       51.61
{txt}    Denmark {c |}{res}          7       22.58       74.19
{txt}    Germany {c |}{res}          4       12.90       87.10
{txt}        USA {c |}{res}          4       12.90      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         31      100.00
{txt}
{com}.         tab country if Year>=1987 & Year<=2002

    {txt}country {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         UK {c |}{res}          4       13.79       13.79
{txt}  Australia {c |}{res}          6       20.69       34.48
{txt}     Canada {c |}{res}          4       13.79       48.28
{txt}    Denmark {c |}{res}          6       20.69       68.97
{txt}    Germany {c |}{res}          5       17.24       86.21
{txt}        USA {c |}{res}          4       13.79      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         29      100.00
{txt}
{com}.         tab country if Year>=2003 & Year<=2017 

    {txt}country {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
         UK {c |}{res}          4       15.38       15.38
{txt}  Australia {c |}{res}          5       19.23       34.62
{txt}     Canada {c |}{res}          5       19.23       53.85
{txt}    Denmark {c |}{res}          4       15.38       69.23
{txt}    Germany {c |}{res}          4       15.38       84.62
{txt}        USA {c |}{res}          4       15.38      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}         26      100.00
{txt}
{com}. 
. ** main model (Table 2)
. 
.         eststo m1: reg Incvote Intvote GDPq2 Australia Canada Denmark Germany USA [pweight=weight], cluster(country)
{txt}(sum of wgt is 113.99544)

Linear regression                               Number of obs     = {res}       114
                                                {txt}{help j_robustsingular:F(1, 5) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.7975
                                                {txt}Root MSE          =    {res} 3.9839

{txt}{ralign 78:(Std. Err. adjusted for {res:6} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .6126857{col 26}{space 2} .0789951{col 37}{space 1}    7.76{col 46}{space 3}0.001{col 54}{space 4} .4096224{col 67}{space 3} .8157489
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2} .4868135{col 26}{space 2} .1673438{col 37}{space 1}    2.91{col 46}{space 3}0.033{col 54}{space 4} .0566425{col 67}{space 3} .9169845
{txt}{space 3}Australia {c |}{col 14}{res}{space 2} 7.010817{col 26}{space 2} .2912586{col 37}{space 1}   24.07{col 46}{space 3}0.000{col 54}{space 4} 6.262113{col 67}{space 3} 7.759522
{txt}{space 6}Canada {c |}{col 14}{res}{space 2} -4.41922{col 26}{space 2} .2256407{col 37}{space 1}  -19.59{col 46}{space 3}0.000{col 54}{space 4}-4.999248{col 67}{space 3}-3.839192
{txt}{space 5}Denmark {c |}{col 14}{res}{space 2}-.8304306{col 26}{space 2} .2797101{col 37}{space 1}   -2.97{col 46}{space 3}0.031{col 54}{space 4}-1.549448{col 67}{space 3} -.111413
{txt}{space 5}Germany {c |}{col 14}{res}{space 2} 5.245428{col 26}{space 2} .3773892{col 37}{space 1}   13.90{col 46}{space 3}0.000{col 54}{space 4} 4.275318{col 67}{space 3} 6.215537
{txt}{space 9}USA {c |}{col 14}{res}{space 2} 3.567119{col 26}{space 2} 1.012969{col 37}{space 1}    3.52{col 46}{space 3}0.017{col 54}{space 4} .9631999{col 67}{space 3} 6.171039
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 14.83672{col 26}{space 2} 3.328801{col 37}{space 1}    4.46{col 46}{space 3}0.007{col 54}{space 4} 6.279762{col 67}{space 3} 23.39367
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         
.         predict modelpredictions
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         gen abserror=abs(Incvote-modelpredictions)
{txt}
{com}.         
.         esttab m1  using table2.tex , b(2) se(2) r2 ar2 nogap wide replace 
{res}{txt}(note: file table2.tex not found)
(output written to {browse  `"table2.tex"'})

{com}.          
. ** MAE by time period (Table 3)
. 
.         sum abserror                                                                // gives the MAE for the full sample (entered in Table 2)

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}abserror {c |}{res}        114    2.733627    2.790796   .0181595   17.78858
{txt}
{com}.         
.         sum abserror if Year>=1955 & Year<=1984

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}abserror {c |}{res}         59    2.706838    2.755052   .0242769   15.45734
{txt}
{com}.         sum abserror if Year>=1987 & Year<=2017

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}abserror {c |}{res}         55    2.762364     2.85378   .0181595   17.78858
{txt}
{com}.         
.         sum abserror if Year>=1955 & Year<=1970

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}abserror {c |}{res}         28    2.476684    2.288346   .0748245   11.28251
{txt}
{com}.         sum abserror if Year>=1971 & Year<=1986

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}abserror {c |}{res}         31    2.914719    3.141278   .0242769   15.45734
{txt}
{com}.         sum abserror if Year>=1987 & Year<=2002

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}abserror {c |}{res}         29     3.04635    3.610894   .0181595   17.78858
{txt}
{com}.         sum abserror if Year>=2003 & Year<=2017

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}abserror {c |}{res}         26     2.44561    1.670357   .0578422   5.864376
{txt}
{com}.         
. ** plot of absolute errors (Figure 1) 
.         
.         twoway scatter abserror Year || lpolyci abserror Year, saving("figure1.gph", replace) ytitle("Absolute unstandardized residuals") xlabel(1950(10)2020) legend(off)
{res}{txt}(note: file figure1.gph not found)
{res}{txt}(file figure1.gph saved)

{com}.         
. ** regressing errors on time (Table 4)
. 
.         eststo m2: reg abserror Time Australia Canada Denmark Germany USA [pweight=weight], cluster(country)
{txt}(sum of wgt is 113.99544)

Linear regression                               Number of obs     = {res}       114
                                                {txt}{help j_robustsingular:F(0, 5) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.1705
                                                {txt}Root MSE          =    {res}  2.559

{txt}{ralign 78:(Std. Err. adjusted for {res:6} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}    abserror{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 8}Time {c |}{col 14}{res}{space 2} .4322087{col 26}{space 2} .6460403{col 37}{space 1}    0.67{col 46}{space 3}0.533{col 54}{space 4}-1.228491{col 67}{space 3} 2.092908
{txt}{space 3}Australia {c |}{col 14}{res}{space 2}-.5062873{col 26}{space 2} .0142418{col 37}{space 1}  -35.55{col 46}{space 3}0.000{col 54}{space 4}-.5428969{col 67}{space 3}-.4696777
{txt}{space 6}Canada {c |}{col 14}{res}{space 2} 2.400428{col 26}{space 2} .0089625{col 37}{space 1}  267.83{col 46}{space 3}0.000{col 54}{space 4}  2.37739{col 67}{space 3} 2.423467
{txt}{space 5}Denmark {c |}{col 14}{res}{space 2}-.6779319{col 26}{space 2} .0074948{col 37}{space 1}  -90.45{col 46}{space 3}0.000{col 54}{space 4}-.6971979{col 67}{space 3} -.658666
{txt}{space 5}Germany {c |}{col 14}{res}{space 2} -.330783{col 26}{space 2} .0228687{col 37}{space 1}  -14.46{col 46}{space 3}0.000{col 54}{space 4}-.3895688{col 67}{space 3}-.2719971
{txt}{space 9}USA {c |}{col 14}{res}{space 2}-.9853237{col 26}{space 2} .0136203{col 37}{space 1}  -72.34{col 46}{space 3}0.000{col 54}{space 4}-1.020336{col 67}{space 3}-.9503116
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 2.510974{col 26}{space 2}  .315117{col 37}{space 1}    7.97{col 46}{space 3}0.001{col 54}{space 4}  1.70094{col 67}{space 3} 3.321008
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         esttab m2  using table4.tex , b(2) se(2) r2 nogap wide replace 
{res}{txt}(note: file table4.tex not found)
(output written to {browse  `"table4.tex"'})

{com}.         
.         
.         
.         
. *****************************
. ** supplementary materials **
. *****************************
. 
. ** A. coding and sources of variables
. 
. ** B. country-specific models
. 
.         eststo m1: reg Incvote Intvote GDPq2 if UK==1

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        17
{txt}{hline 13}{c +}{hline 34}   F(2, 14)        = {res}    17.84
{txt}       Model {c |} {res} 389.895856         2  194.947928   {txt}Prob > F        ={res}    0.0001
{txt}    Residual {c |} {res} 152.982971        14   10.927355   {txt}R-squared       ={res}    0.7182
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.6779
{txt}       Total {c |} {res} 542.878827        16  33.9299267   {txt}Root MSE        =   {res} 3.3057

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .7821272{col 26}{space 2} .1425016{col 37}{space 1}    5.49{col 46}{space 3}0.000{col 54}{space 4} .4764916{col 67}{space 3} 1.087763
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2} .5406802{col 26}{space 2} .3306581{col 37}{space 1}    1.64{col 46}{space 3}0.124{col 54}{space 4}-.1685109{col 67}{space 3} 1.249871
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 7.792737{col 26}{space 2} 5.815406{col 37}{space 1}    1.34{col 46}{space 3}0.202{col 54}{space 4}-4.680069{col 67}{space 3} 20.26554
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict uk_errors
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         eststo m2: reg Incvote Intvote GDPq2 if Australia==1

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        23
{txt}{hline 13}{c +}{hline 34}   F(2, 20)        = {res}     6.42
{txt}       Model {c |} {res} 75.2457532         2  37.6228766   {txt}Prob > F        ={res}    0.0070
{txt}    Residual {c |} {res} 117.242038        20  5.86210191   {txt}R-squared       ={res}    0.3909
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.3300
{txt}       Total {c |} {res} 192.487791        22  8.74944506   {txt}Root MSE        =   {res} 2.4212

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .3676196{col 26}{space 2} .1026958{col 37}{space 1}    3.58{col 46}{space 3}0.002{col 54}{space 4} .1533998{col 67}{space 3} .5818393
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2}-.0837855{col 26}{space 2} .2358657{col 37}{space 1}   -0.36{col 46}{space 3}0.726{col 54}{space 4}-.5757927{col 67}{space 3} .4082217
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 34.51839{col 26}{space 2}  4.46086{col 37}{space 1}    7.74{col 46}{space 3}0.000{col 54}{space 4}  25.2132{col 67}{space 3} 43.82358
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict aus_errors
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         eststo m3: reg Incvote Intvote GDPq2 if Canada==1

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        20
{txt}{hline 13}{c +}{hline 34}   F(2, 17)        = {res}     2.31
{txt}       Model {c |} {res} 237.961966         2  118.980983   {txt}Prob > F        ={res}    0.1295
{txt}    Residual {c |} {res}  875.43807        17   51.496357   {txt}R-squared       ={res}    0.2137
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.1212
{txt}       Total {c |} {res} 1113.40004        19  58.6000019   {txt}Root MSE        =   {res} 7.1761

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .4669771{col 26}{space 2} .2178932{col 37}{space 1}    2.14{col 46}{space 3}0.047{col 54}{space 4} .0072626{col 67}{space 3} .9266917
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2}-.3432906{col 26}{space 2} .9116865{col 37}{space 1}   -0.38{col 46}{space 3}0.711{col 54}{space 4}-2.266781{col 67}{space 3}   1.5802
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 19.63251{col 26}{space 2} 8.862752{col 37}{space 1}    2.22{col 46}{space 3}0.041{col 54}{space 4} .9337348{col 67}{space 3} 38.33128
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict can_errors
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         eststo m4: reg Incvote Intvote GDPq2 if Denmark==1

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        21
{txt}{hline 13}{c +}{hline 34}   F(2, 18)        = {res}    56.15
{txt}       Model {c |} {res} 896.352209         2  448.176105   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 143.670648        18  7.98170267   {txt}R-squared       ={res}    0.8619
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.8465
{txt}       Total {c |} {res} 1040.02286        20  52.0011429   {txt}Root MSE        =   {res} 2.8252

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .8260141{col 26}{space 2} .0862084{col 37}{space 1}    9.58{col 46}{space 3}0.000{col 54}{space 4} .6448971{col 67}{space 3} 1.007131
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2}   .32055{col 26}{space 2} .2579095{col 37}{space 1}    1.24{col 46}{space 3}0.230{col 54}{space 4}-.2212979{col 67}{space 3} .8623978
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 6.430314{col 26}{space 2} 3.141641{col 37}{space 1}    2.05{col 46}{space 3}0.056{col 54}{space 4}-.1700294{col 67}{space 3} 13.03066
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict dnk_errors
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         eststo m5: reg Incvote Intvote GDPq2 if Germany==1

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        17
{txt}{hline 13}{c +}{hline 34}   F(2, 14)        = {res}    40.24
{txt}       Model {c |} {res} 571.623578         2  285.811789   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 99.4352454        14  7.10251753   {txt}R-squared       ={res}    0.8518
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.8307
{txt}       Total {c |} {res} 671.058824        16  41.9411765   {txt}Root MSE        =   {res} 2.6651

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .7101819{col 26}{space 2} .1377156{col 37}{space 1}    5.16{col 46}{space 3}0.000{col 54}{space 4} .4148114{col 67}{space 3} 1.005552
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2} .7247035{col 26}{space 2} .2335753{col 37}{space 1}    3.10{col 46}{space 3}0.008{col 54}{space 4} .2237344{col 67}{space 3} 1.225673
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 15.09279{col 26}{space 2} 6.028128{col 37}{space 1}    2.50{col 46}{space 3}0.025{col 54}{space 4} 2.163745{col 67}{space 3} 28.02184
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict deu_errors
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         eststo m6: reg Incvote Intvote GDPq2 if USA==1

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        16
{txt}{hline 13}{c +}{hline 34}   F(2, 13)        = {res}    34.80
{txt}       Model {c |} {res} 369.243571         2  184.621786   {txt}Prob > F        ={res}    0.0000
{txt}    Residual {c |} {res} 68.9675918        13  5.30519937   {txt}R-squared       ={res}    0.8426
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.8184
{txt}       Total {c |} {res} 438.211163        15  29.2140776   {txt}Root MSE        =   {res} 2.3033

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .5100254{col 26}{space 2} .0777701{col 37}{space 1}    6.56{col 46}{space 3}0.000{col 54}{space 4} .3420134{col 67}{space 3} .6780374
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2} .9078778{col 26}{space 2} .2662072{col 37}{space 1}    3.41{col 46}{space 3}0.005{col 54}{space 4}  .332772{col 67}{space 3} 1.482984
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 22.24063{col 26}{space 2} 4.029094{col 37}{space 1}    5.52{col 46}{space 3}0.000{col 54}{space 4}  13.5363{col 67}{space 3} 30.94495
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict usa_errors
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         esttab m1 m2 m3 m4 m5 m6 using appB_table1.tex , b(2) se(2) nogap replace 
{res}{txt}(note: file appB_table1.tex not found)
(output written to {browse  `"appB_table1.tex"'})

{com}.         
.         gen country_errors=uk_errors if UK==1
{txt}(97 missing values generated)

{com}.         replace country_errors=aus_errors if Australia==1
{txt}(23 real changes made)

{com}.         replace country_errors=can_errors if Canada==1
{txt}(20 real changes made)

{com}.         replace country_errors=dnk_errors if Denmark==1
{txt}(21 real changes made)

{com}.         replace country_errors=deu_errors if Germany==1
{txt}(17 real changes made)

{com}.         replace country_errors=usa_errors if USA==1
{txt}(16 real changes made)

{com}.         
.         gen abscountryerrors=abs(Incvote-country_errors)
{txt}
{com}.         twoway scatter abscountryerrors Year || lpolyci abscountryerrors Year
{res}{txt}
{com}.         
.         twoway scatter abscountryerrors Year if UK==1 || lpolyci abscountryerrors Year if UK==1, saving(uk_poly.gph, replace) title("United Kingdom") legend(off)
{res}{txt}(note: file uk_poly.gph not found)
{res}{txt}(file uk_poly.gph saved)

{com}.         twoway scatter abscountryerrors Year if Australia==1 || lpolyci abscountryerrors Year if Australia==1, saving(aus_poly.gph, replace) title("Australia") legend(off)
{res}{txt}(note: file aus_poly.gph not found)
{res}{txt}(file aus_poly.gph saved)

{com}.         twoway scatter abscountryerrors Year if Canada==1 || lpolyci abscountryerrors Year if Canada==1, saving(can_poly.gph, replace) title("Canada") legend(off)
{res}{txt}(note: file can_poly.gph not found)
{res}{txt}(file can_poly.gph saved)

{com}.         twoway scatter abscountryerrors Year if Denmark==1 || lpolyci abscountryerrors Year if Denmark==1, saving(dnk_poly.gph, replace) title("Denmark") legend(off)
{res}{txt}(note: file dnk_poly.gph not found)
{res}{txt}(file dnk_poly.gph saved)

{com}.         twoway scatter abscountryerrors Year if Germany==1 || lpolyci abscountryerrors Year if Germany==1, saving(deu_poly.gph, replace) title("Germany") legend(off)
{res}{txt}(note: file deu_poly.gph not found)
{res}{txt}(file deu_poly.gph saved)

{com}.         twoway scatter abscountryerrors Year if USA==1 || lpolyci abscountryerrors Year if USA==1, saving(usa_poly.gph, replace) title("United States") legend(off)
{res}{txt}(note: file usa_poly.gph not found)
{res}{txt}(file usa_poly.gph saved)

{com}.         
.         graph combine uk_poly.gph aus_poly.gph can_poly.gph dnk_poly.gph deu_poly.gph usa_poly.gph, col(2) ycommon
{res}{txt}
{com}.         
. ** C. different operationalisations of time
.         
.         gen TimeBis=Year-1955
{txt}
{com}.         
.         eststo m1: reg abserror c.Time##c.Time Australia Canada Denmark Germany USA [pweight=weight], cluster(country)
{txt}(sum of wgt is 113.99544)

Linear regression                               Number of obs     = {res}       114
                                                {txt}{help j_robustsingular:F(1, 5) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.1735
                                                {txt}Root MSE          =    {res} 2.5665

{txt}{ralign 79:(Std. Err. adjusted for {res:6} clusters in country)}
{hline 14}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 15}{c |}{col 27}    Robust
{col 1}     abserror{col 15}{c |}      Coef.{col 27}   Std. Err.{col 39}      t{col 47}   P>|t|{col 55}     [95% Con{col 68}f. Interval]
{hline 14}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 9}Time {c |}{col 15}{res}{space 2} 2.389829{col 27}{space 2}  5.08123{col 38}{space 1}    0.47{col 47}{space 3}0.658{col 55}{space 4}-10.67189{col 68}{space 3} 15.45155
{txt}{space 13} {c |}
c.Time#c.Time {c |}{col 15}{res}{space 2}-1.957625{col 27}{space 2}  4.72475{col 38}{space 1}   -0.41{col 47}{space 3}0.696{col 55}{space 4}-14.10298{col 68}{space 3} 10.18773
{txt}{space 13} {c |}
{space 4}Australia {c |}{col 15}{res}{space 2}-.5457457{col 27}{space 2} .1031487{col 38}{space 1}   -5.29{col 47}{space 3}0.003{col 55}{space 4}-.8108978{col 68}{space 3}-.2805935
{txt}{space 7}Canada {c |}{col 15}{res}{space 2} 2.396283{col 27}{space 2} .0093751{col 38}{space 1}  255.60{col 47}{space 3}0.000{col 55}{space 4} 2.372183{col 68}{space 3} 2.420382
{txt}{space 6}Denmark {c |}{col 15}{res}{space 2}-.7353268{col 27}{space 2} .1424564{col 38}{space 1}   -5.16{col 47}{space 3}0.004{col 55}{space 4}-1.101523{col 68}{space 3}-.3691309
{txt}{space 6}Germany {c |}{col 15}{res}{space 2}-.3453563{col 27}{space 2} .0506154{col 38}{space 1}   -6.82{col 47}{space 3}0.001{col 55}{space 4}-.4754674{col 68}{space 3}-.2152453
{txt}{space 10}USA {c |}{col 15}{res}{space 2}-.9976561{col 27}{space 2} .0384359{col 38}{space 1}  -25.96{col 47}{space 3}0.000{col 55}{space 4}-1.096459{col 68}{space 3}-.8988534
{txt}{space 8}_cons {c |}{col 15}{res}{space 2} 2.210631{col 27}{space 2} .9238867{col 38}{space 1}    2.39{col 47}{space 3}0.062{col 55}{space 4}-.1642953{col 68}{space 3} 4.585557
{txt}{hline 14}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         eststo m2: reg abserror TimeBis Australia Canada Denmark Germany USA [pweight=weight], cluster(country)
{txt}(sum of wgt is 113.99544)

Linear regression                               Number of obs     = {res}       114
                                                {txt}{help j_robustsingular:F(0, 5) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.1698
                                                {txt}Root MSE          =    {res} 2.5601

{txt}{ralign 78:(Std. Err. adjusted for {res:6} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}    abserror{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}TimeBis {c |}{col 14}{res}{space 2} .0057375{col 26}{space 2}  .009712{col 37}{space 1}    0.59{col 46}{space 3}0.580{col 54}{space 4}-.0192279{col 67}{space 3} .0307028
{txt}{space 3}Australia {c |}{col 14}{res}{space 2}-.5008974{col 26}{space 2} .0070045{col 37}{space 1}  -71.51{col 46}{space 3}0.000{col 54}{space 4}-.5189031{col 67}{space 3}-.4828917
{txt}{space 6}Canada {c |}{col 14}{res}{space 2} 2.400372{col 26}{space 2} .0100547{col 37}{space 1}  238.73{col 46}{space 3}0.000{col 54}{space 4} 2.374526{col 67}{space 3} 2.426219
{txt}{space 5}Denmark {c |}{col 14}{res}{space 2}-.6740268{col 26}{space 2} .0018771{col 37}{space 1} -359.08{col 46}{space 3}0.000{col 54}{space 4} -.678852{col 67}{space 3}-.6692015
{txt}{space 5}Germany {c |}{col 14}{res}{space 2} -.325271{col 26}{space 2} .0165674{col 37}{space 1}  -19.63{col 46}{space 3}0.000{col 54}{space 4} -.367859{col 67}{space 3} -.282683
{txt}{space 9}USA {c |}{col 14}{res}{space 2}-.9805991{col 26}{space 2} .0074268{col 37}{space 1} -132.04{col 46}{space 3}0.000{col 54}{space 4}-.9996902{col 67}{space 3}-.9615079
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 2.548316{col 26}{space 2} .2936437{col 37}{space 1}    8.68{col 46}{space 3}0.000{col 54}{space 4} 1.793481{col 67}{space 3} 3.303151
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         
.         esttab m1 m2 using appC_table1.tex, b(2) se(2) r2 nogap replace
{res}{txt}(note: file appC_table1.tex not found)
(output written to {browse  `"appC_table1.tex"'})

{com}.         
. 
. ** D. disregarding outliers
.         
.         gen outlier=0
{txt}
{com}.         replace outlier=1 if Canada==1 & Year==1958
{txt}(1 real change made)

{com}.         replace outlier=1 if Canada==1 & Year==1984
{txt}(1 real change made)

{com}.         replace outlier=1 if Canada==1 & Year==1993
{txt}(1 real change made)

{com}.         replace outlier=1 if Denmark==1 & Year==1973
{txt}(1 real change made)

{com}.         
.         * table 1
.         eststo m1: reg Incvote Intvote GDPq2 Australia Canada Denmark Germany USA if outlier==0 [pweight=weight], cluster(country)
{txt}(sum of wgt is 110.2408282857143)

Linear regression                               Number of obs     = {res}       110
                                                {txt}{help j_robustsingular:F(1, 5) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.8671
                                                {txt}Root MSE          =    {res} 2.9796

{txt}{ralign 78:(Std. Err. adjusted for {res:6} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}     Incvote{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}Intvote {c |}{col 14}{res}{space 2} .5823252{col 26}{space 2} .0813776{col 37}{space 1}    7.16{col 46}{space 3}0.001{col 54}{space 4} .3731374{col 67}{space 3} .7915131
{txt}{space 7}GDPq2 {c |}{col 14}{res}{space 2} .5755105{col 26}{space 2} .1413322{col 37}{space 1}    4.07{col 46}{space 3}0.010{col 54}{space 4} .2122045{col 67}{space 3} .9388165
{txt}{space 3}Australia {c |}{col 14}{res}{space 2} 7.014945{col 26}{space 2} .2832503{col 37}{space 1}   24.77{col 46}{space 3}0.000{col 54}{space 4} 6.286827{col 67}{space 3} 7.743063
{txt}{space 6}Canada {c |}{col 14}{res}{space 2} -3.26778{col 26}{space 2} .1886264{col 37}{space 1}  -17.32{col 46}{space 3}0.000{col 54}{space 4} -3.75266{col 67}{space 3}  -2.7829
{txt}{space 5}Denmark {c |}{col 14}{res}{space 2}-.4015211{col 26}{space 2} .2677904{col 37}{space 1}   -1.50{col 46}{space 3}0.194{col 54}{space 4}-1.089898{col 67}{space 3}  .286856
{txt}{space 5}Germany {c |}{col 14}{res}{space 2} 5.420596{col 26}{space 2} .3888652{col 37}{space 1}   13.94{col 46}{space 3}0.000{col 54}{space 4} 4.420986{col 67}{space 3} 6.420206
{txt}{space 9}USA {c |}{col 14}{res}{space 2}  3.83004{col 26}{space 2} 1.032337{col 37}{space 1}    3.71{col 46}{space 3}0.014{col 54}{space 4} 1.176332{col 67}{space 3} 6.483747
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 15.84372{col 26}{space 2} 3.409204{col 37}{space 1}    4.65{col 46}{space 3}0.006{col 54}{space 4} 7.080084{col 67}{space 3} 24.60736
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict modelpredictions_nooutliers
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         gen abserror_nooutliers=abs(Incvote-modelpredictions_nooutliers)
{txt}
{com}.         replace abserror_nooutliers=. if outlier==1
{txt}(4 real changes made, 4 to missing)

{com}.         
.         esttab m1  using appD_table1.tex , b(2) se(2) r2 nogap wide replace 
{res}{txt}(note: file appD_table1.tex not found)
(output written to {browse  `"appD_table1.tex"'})

{com}.         
.         * table 2
.         sum abserror_nooutliers

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
abserror_n~s {c |}{res}        110    2.344453    1.685455   .0653453    7.78167
{txt}
{com}.         
.         sum abserror_nooutliers if Year>=1955 & Year<=1984

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
abserror_n~s {c |}{res}         56    2.242969    1.451554   .1754762   5.915748
{txt}
{com}.         sum abserror_nooutliers if Year>=1987 & Year<=2017

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
abserror_n~s {c |}{res}         54    2.449695    1.906208   .0653453    7.78167
{txt}
{com}.         
.         sum abserror_nooutliers if Year>=1955 & Year<=1970

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
abserror_n~s {c |}{res}         27    2.251902    1.504609   .2818565   5.915748
{txt}
{com}.         sum abserror_nooutliers if Year>=1971 & Year<=1986

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
abserror_n~s {c |}{res}         29    2.234652     1.42705   .1754762   5.902448
{txt}
{com}.         sum abserror_nooutliers if Year>=1987 & Year<=2002

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
abserror_n~s {c |}{res}         28    2.542195    2.233658   .0653453    7.78167
{txt}
{com}.         sum abserror_nooutliers if Year>=2003 & Year<=2017

{txt}    Variable {c |}        Obs        Mean    Std. Dev.       Min        Max
{hline 13}{c +}{hline 57}
abserror_n~s {c |}{res}         26     2.35008    1.514932   .1658095   4.748168
{txt}
{com}.         
.         * table 3
.         eststo m2: reg abserror_nooutliers Time Australia Canada Denmark Germany USA if outlier==0 [pweight=weight], cluster(country)
{txt}(sum of wgt is 110.2408282857143)

Linear regression                               Number of obs     = {res}       110
                                                {txt}{help j_robustsingular:F(0, 5) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.1098
                                                {txt}Root MSE          =    {res} 1.6145

{txt}{ralign 78:(Std. Err. adjusted for {res:6} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}abserror_n~s{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 8}Time {c |}{col 14}{res}{space 2} .4942023{col 26}{space 2} .5370429{col 37}{space 1}    0.92{col 46}{space 3}0.400{col 54}{space 4}-.8863105{col 67}{space 3} 1.874715
{txt}{space 3}Australia {c |}{col 14}{res}{space 2}-.5963871{col 26}{space 2} .0118389{col 37}{space 1}  -50.38{col 46}{space 3}0.000{col 54}{space 4}  -.62682{col 67}{space 3}-.5659541
{txt}{space 6}Canada {c |}{col 14}{res}{space 2}  .342895{col 26}{space 2} .0005591{col 37}{space 1}  613.27{col 46}{space 3}0.000{col 54}{space 4} .3414577{col 67}{space 3} .3443322
{txt}{space 5}Denmark {c |}{col 14}{res}{space 2}-1.092282{col 26}{space 2} .0117976{col 37}{space 1}  -92.59{col 46}{space 3}0.000{col 54}{space 4}-1.122609{col 67}{space 3}-1.061956
{txt}{space 5}Germany {c |}{col 14}{res}{space 2}-.4622388{col 26}{space 2} .0190104{col 37}{space 1}  -24.32{col 46}{space 3}0.000{col 54}{space 4}-.5111066{col 67}{space 3}-.4133711
{txt}{space 9}USA {c |}{col 14}{res}{space 2}-1.171944{col 26}{space 2} .0113224{col 37}{space 1} -103.51{col 46}{space 3}0.000{col 54}{space 4}-1.201049{col 67}{space 3}-1.142839
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 2.607051{col 26}{space 2} .2619517{col 37}{space 1}    9.95{col 46}{space 3}0.000{col 54}{space 4} 1.933683{col 67}{space 3}  3.28042
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         esttab m2  using appD_table3.tex , b(2) se(2) r2 nogap wide replace 
{res}{txt}(note: file appD_table3.tex not found)
(output written to {browse  `"appD_table3.tex"'})

{com}.         
.         
. ** E. test with government approval data (only available for three countries)
. 
.         * load dataset that includes approval data for UK, Germany and USA
.         use "Approval_PSRM_2019.dta", clear
{txt}
{com}. 
.         * estimate popularity models
.         eststo m1: reg Incvote GovPopularity3m GDPq2 if Germany==1

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        17
{txt}{hline 13}{c +}{hline 34}   F(2, 14)        = {res}    12.20
{txt}       Model {c |} {res} 426.397262         2  213.198631   {txt}Prob > F        ={res}    0.0009
{txt}    Residual {c |} {res} 244.661561        14  17.4758258   {txt}R-squared       ={res}    0.6354
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}    0.5833
{txt}       Total {c |} {res} 671.058824        16  41.9411765   {txt}Root MSE        =   {res} 4.1804

{txt}{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}        Incvote{col 17}{c |}      Coef.{col 29}   Std. Err.{col 41}      t{col 49}   P>|t|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
GovPopularity3m {c |}{col 17}{res}{space 2}  .179941{col 29}{space 2} .1138518{col 40}{space 1}    1.58{col 49}{space 3}0.136{col 57}{space 4}-.0642468{col 70}{space 3} .4241288
{txt}{space 10}GDPq2 {c |}{col 17}{res}{space 2} 1.408045{col 29}{space 2}  .301302{col 40}{space 1}    4.67{col 49}{space 3}0.000{col 57}{space 4} .7618166{col 70}{space 3} 2.054274
{txt}{space 10}_cons {c |}{col 17}{res}{space 2} 35.40038{col 29}{space 2}  6.76593{col 40}{space 1}    5.23{col 49}{space 3}0.000{col 57}{space 4} 20.88891{col 70}{space 3} 49.91186
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict predictm1 if Germany==1
{txt}(option {bf:xb} assumed; fitted values)
(33 missing values generated)

{com}.         
.         eststo m2: reg Incvote GovPopularity3m GDPq2 i.country , cluster(country)

{txt}Linear regression                               Number of obs     = {res}        50
                                                {txt}{help j_robustsingular:F(1, 2) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.7639
                                                {txt}Root MSE          =    {res} 3.8479

{txt}{ralign 81:(Std. Err. adjusted for {res:3} clusters in country)}
{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 17}{c |}{col 29}    Robust
{col 1}        Incvote{col 17}{c |}      Coef.{col 29}   Std. Err.{col 41}      t{col 49}   P>|t|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
GovPopularity3m {c |}{col 17}{res}{space 2}  .281582{col 29}{space 2}  .081703{col 40}{space 1}    3.45{col 49}{space 3}0.075{col 57}{space 4}-.0699576{col 70}{space 3} .6331217
{txt}{space 10}GDPq2 {c |}{col 17}{res}{space 2} .9892274{col 29}{space 2} .3898072{col 40}{space 1}    2.54{col 49}{space 3}0.126{col 57}{space 4}-.6879774{col 70}{space 3} 2.666432
{txt}{space 15} {c |}
{space 8}country {c |}
{space 7}Germany  {c |}{col 17}{res}{space 2} 3.906809{col 29}{space 2} 1.398808{col 40}{space 1}    2.79{col 49}{space 3}0.108{col 57}{space 4}-2.111776{col 70}{space 3} 9.925394
{txt}{space 11}USA  {c |}{col 17}{res}{space 2} 8.570346{col 29}{space 2} .3054218{col 40}{space 1}   28.06{col 49}{space 3}0.001{col 57}{space 4} 7.256222{col 70}{space 3}  9.88447
{txt}{space 15} {c |}
{space 10}_cons {c |}{col 17}{res}{space 2} 26.50645{col 29}{space 2} 2.715286{col 40}{space 1}    9.76{col 49}{space 3}0.010{col 57}{space 4} 14.82352{col 70}{space 3} 38.18938
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict predictm2 if e(sample)==1
{txt}(option {bf:xb} assumed; fitted values)

{com}.         
.         eststo m3: reg Incvote GovPopularity3m GDPq2 i.country if UK==1 | USA==1, cluster(country)

{txt}Linear regression                               Number of obs     = {res}        33
                                                {txt}{help j_robustsingular:F(0, 1) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.8468
                                                {txt}Root MSE          =    {res} 3.3172

{txt}{ralign 81:(Std. Err. adjusted for {res:2} clusters in country)}
{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 17}{c |}{col 29}    Robust
{col 1}        Incvote{col 17}{c |}      Coef.{col 29}   Std. Err.{col 41}      t{col 49}   P>|t|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
GovPopularity3m {c |}{col 17}{res}{space 2} .3527622{col 29}{space 2} .0852485{col 40}{space 1}    4.14{col 49}{space 3}0.151{col 57}{space 4}-.7304225{col 70}{space 3} 1.435947
{txt}{space 10}GDPq2 {c |}{col 17}{res}{space 2} .4258246{col 29}{space 2} .0472614{col 40}{space 1}    9.01{col 49}{space 3}0.070{col 57}{space 4}-.1746886{col 70}{space 3} 1.026338
{txt}{space 15} {c |}
{space 8}country {c |}
{space 11}USA  {c |}{col 17}{res}{space 2} 8.774819{col 29}{space 2} .4961111{col 40}{space 1}   17.69{col 49}{space 3}0.036{col 57}{space 4}  2.47113{col 70}{space 3} 15.07851
{txt}{space 10}_cons {c |}{col 17}{res}{space 2} 24.93655{col 29}{space 2} 3.507981{col 40}{space 1}    7.11{col 49}{space 3}0.089{col 57}{space 4}-19.63658{col 70}{space 3} 69.50967
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict predictm3 if e(sample)==1
{txt}(option {bf:xb} assumed; fitted values)
(17 missing values generated)

{com}.         
.         eststo m4: reg Incvote GovPopularity6m GDPq2 i.country if UK==1 | USA==1, cluster(country)

{txt}Linear regression                               Number of obs     = {res}        30
                                                {txt}{help j_robustsingular:F(0, 1) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.7871
                                                {txt}Root MSE          =    {res} 3.9731

{txt}{ralign 81:(Std. Err. adjusted for {res:2} clusters in country)}
{hline 16}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 17}{c |}{col 29}    Robust
{col 1}        Incvote{col 17}{c |}      Coef.{col 29}   Std. Err.{col 41}      t{col 49}   P>|t|{col 57}     [95% Con{col 70}f. Interval]
{hline 16}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
GovPopularity6m {c |}{col 17}{res}{space 2} .3371816{col 29}{space 2} .0788398{col 40}{space 1}    4.28{col 49}{space 3}0.146{col 57}{space 4}-.6645731{col 70}{space 3} 1.338936
{txt}{space 10}GDPq2 {c |}{col 17}{res}{space 2} .7909482{col 29}{space 2} .1590007{col 40}{space 1}    4.97{col 49}{space 3}0.126{col 57}{space 4}-1.229347{col 70}{space 3} 2.811243
{txt}{space 15} {c |}
{space 8}country {c |}
{space 11}USA  {c |}{col 17}{res}{space 2} 7.711941{col 29}{space 2} .4251656{col 40}{space 1}   18.14{col 49}{space 3}0.035{col 57}{space 4} 2.309699{col 70}{space 3} 13.11418
{txt}{space 10}_cons {c |}{col 17}{res}{space 2}  24.4734{col 29}{space 2} 3.020702{col 40}{space 1}    8.10{col 49}{space 3}0.078{col 57}{space 4}-13.90825{col 70}{space 3} 62.85505
{txt}{hline 16}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         predict predictm4 if e(sample)==1
{txt}(option {bf:xb} assumed; fitted values)
(20 missing values generated)

{com}.         
.         * table 1
.         esttab m1 m2 m3 m4  using appE_table1.tex, b(2) se(2) r2 wide nogap replace
{res}{txt}(note: file appE_table1.tex not found)
(output written to {browse  `"appE_table1.tex"'})

{com}. 
.         * regress popularity errors on time     
.         gen time_01=(Year-1955)/(2017-1955)
{txt}
{com}.         
.         gen popularity_errorm1=abs(Incvote-predictm1) 
{txt}(33 missing values generated)

{com}.         gen popularity_errorm2=abs(Incvote-predictm2) 
{txt}
{com}.         gen popularity_errorm3=abs(Incvote-predictm3) 
{txt}(17 missing values generated)

{com}.         gen popularity_errorm4=abs(Incvote-predictm4) 
{txt}(20 missing values generated)

{com}.         
.         eststo m5: reg popularity_errorm1 time_01 

{txt}      Source {c |}       SS           df       MS      Number of obs   ={res}        17
{txt}{hline 13}{c +}{hline 34}   F(1, 15)        = {res}     0.43
{txt}       Model {c |} {res} 1.56013936         1  1.56013936   {txt}Prob > F        ={res}    0.5241
{txt}    Residual {c |} {res} 55.0166823        15  3.66777882   {txt}R-squared       ={res}    0.0276
{txt}{hline 13}{c +}{hline 34}   Adj R-squared   ={res}   -0.0373
{txt}       Total {c |} {res} 56.5768216        16  3.53605135   {txt}Root MSE        =   {res} 1.9151

{txt}{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 1}popularity~1{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}time_01 {c |}{col 14}{res}{space 2}-1.036434{col 26}{space 2} 1.589138{col 37}{space 1}   -0.65{col 46}{space 3}0.524{col 54}{space 4}-4.423603{col 67}{space 3} 2.350734
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 3.860181{col 26}{space 2} .9412808{col 37}{space 1}    4.10{col 46}{space 3}0.001{col 54}{space 4} 1.853888{col 67}{space 3} 5.866473
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         eststo m6: reg popularity_errorm2 time_01 i.country , cluster(country)

{txt}Linear regression                               Number of obs     = {res}        50
                                                {txt}{help j_robustsingular:F(0, 2) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.0562
                                                {txt}Root MSE          =    {res} 2.2248

{txt}{ralign 78:(Std. Err. adjusted for {res:3} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}popularity~2{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}time_01 {c |}{col 14}{res}{space 2}-.1472687{col 26}{space 2} .3536871{col 37}{space 1}   -0.42{col 46}{space 3}0.718{col 54}{space 4}-1.669061{col 67}{space 3} 1.374524
{txt}{space 12} {c |}
{space 5}country {c |}
{space 4}Germany  {c |}{col 14}{res}{space 2} .2740479{col 26}{space 2}  .010067{col 37}{space 1}   27.22{col 46}{space 3}0.001{col 54}{space 4} .2307332{col 67}{space 3} .3173627
{txt}{space 8}USA  {c |}{col 14}{res}{space 2}-.9492952{col 26}{space 2} .0046979{col 37}{space 1} -202.07{col 46}{space 3}0.000{col 54}{space 4}-.9695088{col 67}{space 3}-.9290816
{txt}{space 12} {c |}
{space 7}_cons {c |}{col 14}{res}{space 2} 3.199922{col 26}{space 2} .1721456{col 37}{space 1}   18.59{col 46}{space 3}0.003{col 54}{space 4} 2.459239{col 67}{space 3} 3.940604
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         eststo m7: reg popularity_errorm3 time_01 i.country , cluster(country)

{txt}Linear regression                               Number of obs     = {res}        33
                                                {txt}{help j_robustsingular:F(0, 1) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.0253
                                                {txt}Root MSE          =    {res} 1.9897

{txt}{ralign 78:(Std. Err. adjusted for {res:2} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}popularity~3{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}time_01 {c |}{col 14}{res}{space 2}  .657033{col 26}{space 2} 1.224961{col 37}{space 1}    0.54{col 46}{space 3}0.687{col 54}{space 4}-14.90757{col 67}{space 3} 16.22164
{txt}{space 12} {c |}
{space 5}country {c |}
{space 8}USA  {c |}{col 14}{res}{space 2}-.4710881{col 26}{space 2} .0162708{col 37}{space 1}  -28.95{col 46}{space 3}0.022{col 54}{space 4}-.6778288{col 67}{space 3}-.2643474
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 2.349269{col 26}{space 2} .5962096{col 37}{space 1}    3.94{col 46}{space 3}0.158{col 54}{space 4}-5.226292{col 67}{space 3} 9.924831
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         eststo m8: reg popularity_errorm4 time_01 i.country , cluster(country)

{txt}Linear regression                               Number of obs     = {res}        30
                                                {txt}{help j_robustsingular:F(0, 1) }          =  {res}        .
                                                {txt}Prob > F          = {res}         .
                                                {txt}R-squared         = {res}    0.0112
                                                {txt}Root MSE          =    {res} 2.3141

{txt}{ralign 78:(Std. Err. adjusted for {res:2} clusters in country)}
{hline 13}{c TT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{col 14}{c |}{col 26}    Robust
{col 1}popularity~4{col 14}{c |}      Coef.{col 26}   Std. Err.{col 38}      t{col 46}   P>|t|{col 54}     [95% Con{col 67}f. Interval]
{hline 13}{c +}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{space 5}time_01 {c |}{col 14}{res}{space 2}-.7077589{col 26}{space 2} .6798029{col 37}{space 1}   -1.04{col 46}{space 3}0.487{col 54}{space 4}-9.345473{col 67}{space 3} 7.929955
{txt}{space 12} {c |}
{space 5}country {c |}
{space 8}USA  {c |}{col 14}{res}{space 2}-.2228013{col 26}{space 2} .0292388{col 37}{space 1}   -7.62{col 46}{space 3}0.083{col 54}{space 4}-.5943158{col 67}{space 3} .1487131
{txt}{space 7}_cons {c |}{col 14}{res}{space 2} 3.425167{col 26}{space 2} .3472111{col 37}{space 1}    9.86{col 46}{space 3}0.064{col 54}{space 4}-.9865686{col 67}{space 3} 7.836903
{txt}{hline 13}{c BT}{hline 11}{hline 11}{hline 9}{hline 8}{hline 13}{hline 12}
{res}{txt}
{com}.         
.         * table 2
.         esttab m5 m6 m7 m8 using appE_table2.tex, b(2) se(2) r2 wide nogap replace
{res}{txt}(note: file appE_table2.tex not found)
(output written to {browse  `"appE_table2.tex"'})

{com}. 
. 
. 
. 
. 
. 
{txt}end of do-file

{com}. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}/Users/ruthdassonneville/Desktop/replication psrm.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}20 Jan 2019, 12:08:54
{txt}{.-}
{smcl}
{txt}{sf}{ul off}